﻿@model WmWebSystem.Models.Slider

@{
    ViewBag.Title = "编辑";
    Layout = "~/Views/Shared/_Layout_manage.cshtml";
}


<div class="contentcontainer">
    <div class="headings">
        <h2>Slider编辑</h2>
    </div>
    <div class="contentbox">
        @using (Html.BeginForm())
        {
            @Html.ValidationSummary(true)
            @Html.HiddenFor(model => model.SliderId)
            @Html.HiddenFor(model => model.Editor)
            @Html.HiddenFor(model => model.AddTime)
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tbody>
                    <tr>
                        <th width="200px">标题</th>
                        <td>
                            @Html.TextBoxFor(model => model.Title, new { @class = "myInput_text" })
                        </td>
                    </tr>
                    <tr>
                        <th>项目金额</th>
                        <td>
                            @Html.TextBoxFor(model => model.TargetValue, new { @class = "myInput_text" })
                        </td>
                    </tr>
                    <tr>
                        <th>项目类型</th>
                        <td>
                            @{
                                List<SelectListItem> selectList = new List<SelectListItem>();
                                selectList.Add(new SelectListItem { Text = "--请选择类型--", Value = "0", Selected = true });
                                foreach (var e in Enum.GetValues(typeof(WmWebSystem.Models.Enum.ProjectType))) 
                                {
                                    selectList.Add(new SelectListItem { 
                                        Text = Enum.GetName(typeof(WmWebSystem.Models.Enum.ProjectType), e), 
                                        Value = ((int)e).ToString() 
                                    });
                                  }
                                  @Html.DropDownList("projectType", selectList);
                                }
                        
                        </td>
                    </tr>
                    <tr>
                        <th width="200px">摘要</th>
                        <td>
                            @Html.TextBoxFor(model => model.Description, new { @class = "myInput_text" })
                        </td>
                    </tr>
                    <tr>
                        <th>项目描述</th><td>
                            @Html.TextAreaFor(model => model.Content, new { @class = "myInput_area_slider" })
                        </td>
                    </tr>
                    <tr>
                        <th>图片位置</th><td>
                            @Html.TextBoxFor(model => model.ImgUrl, new { @class = "myInput_text" })
                        </td>
                    </tr>
                    <tr>
                        <th>链接地址</th><td>
                            @Html.TextBoxFor(model => model.LinkTo, new { @class = "myInput_text" })
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td>
                            <input type="submit" class="myInput_Buttom" value="保存>>" title="保存slider" />
                            <input type="button" class="myInput_Buttom" onclick="history.go(-1)" id="reset" value="取消" title="取消" />
                        </td>
                    </tr>
                </tbody>
            </table>
            
        }
        <div style="clear: both;"></div>
    </div>
</div>
